import { InjectionKey } from "vue";
import { EChartsOption } from "./echarts";

export type ChartKey = InjectionKey<ChartRegister>;

export type ChartRegister = (instance: ChartInnerMethods) => void;

export interface ChartInnerMethods {
  setLoading: (showLoading: boolean) => void;
  setOptions: (options: EChartsOption) => void;
}

export interface ChartExportMethods extends ChartInnerMethods {
  setChartData: (data: any[]) => void;
}
